package com.lineage.server.serverpackets;

import com.lineage.server.model.Instance.L1PcInstance;

public class S_OwnCharAttrDef extends ServerBasePacket {
  private byte[] _byte;
  
  public S_OwnCharAttrDef(L1PcInstance pc) {
    this._byte = null;
    buildPacket(pc);
  }
  
  private void buildPacket(L1PcInstance pc) {
    writeC(174);
    int ac = pc.getAc();
    writeC(ac);
    writeH(pc.getFire());
    writeH(pc.getWater());
    writeH(pc.getWind());
    writeH(pc.getEarth());
  }
  
  public S_OwnCharAttrDef() {
    this._byte = null;
    writeC(174);
    writeC(-99);
    writeC(90);
    writeC(85);
    writeC(80);
    writeC(75);
  }
  
  public byte[] getContent() {
    if (this._byte == null)
      this._byte = getBytes(); 
    return this._byte;
  }
  
  public String getType() {
    return getClass().getSimpleName();
  }
}
